<template>
	<view class="container">
		<WarnInfo></WarnInfo>
		<view class="evalute_list" v-for="(item,index) in comment" :key="index">
			<view class="top">
				<view class="top_left">
					<image :src="item.avatar?item.avatar:'../../static/img/detailInfo/detailavatar.png'" mode="" class="avatar"></image>
					<view class="">
						<view class="name">
					        {{item.nickname}}
						</view>
						<view class="company">
					         {{item.desc}}
						</view>
					</view>
				</view>
				
				<view class="time">
                    {{item.dateStr}}
				</view>
			</view>
			<view class="content">
               {{item.content}}
			</view>
			<view class="img_list" v-if="item.image.length>0">
				<view class="img_item" v-for="(img,index) in item.image" :key="index">
				      <image :src="  img" mode=""></image>
				</view>
			</view>
		</view>
         
	</view>
</template>

<script>
	import WarnInfo from "../../components/warnInfo.vue"
	export default {
		components: {
			WarnInfo
		},
		data() {
			return {
				evaluteList: [{
					img: "../../static/img/avartor.png",
					name: "时****宏",
					company: "用户曾拼单过该企业装卸/搬运工",
					time: "2020-03-08",
					content:"可以可以去上班，工作好环境好。值得信赖的公司",
					imgs:["../../static/img/evalute1.png","../../static/img/evalute2.png"]
				},
				{
					img: "../../static/img/avartor.png",
					name: "时****宏",
					company: "用户曾拼单过该企业装卸/搬运工",
					time: "2020-03-08",
					content:"可以可以去上班，工作好环境好。值得信赖的公司",
					imgs:[]
				},
				{
					img: "../../static/img/avartor.png",
					name: "时****宏",
					company: "用户曾拼单过该企业装卸/搬运工",
					time: "2020-03-08",
					content:"可以可以去上班，工作好环境好。值得信赖的公司",
					imgs:[]
				}],
				name:"",
				CommentList:[],
				comment:[],

			}
		},
		onLoad(e) {
			this.name = e.name
			this.companyCommentList()
		},
		methods: {
			companyCommentList(){
				this.$utils.requert({url:'companyCommentList',data:{name:this.name},type:'post'}).then(res=>{
						if(res.code === 1 ){
							// this.$utils.showLayer(res.message)
							this.CommentList = res.data
							this.comment = res.data.comment
							// console.log(this.employInfo)
						}else{    
							this.$utils.showLayer(res.message)
						}
					})
			},
		}
	}
</script>
<style>
	page {
		width: 100%;
		height: 100%;
		background-color: #fff;
	}
</style>

<style scoped>
	.container {
		width: 100%;
		height: 100%;
		padding-bottom: 50rpx;
	}
	.evalute_list{
		margin:0 24rpx;
		border-bottom:1rpx solid #f6f6f6;
		padding:36rpx 0;
		box-sizing: border-box;
	}
	.evalute_list .top{
		display: flex;
		align-items: center;
	    justify-content: space-between;
		margin-bottom: 40rpx;
		
	}
	.evalute_list .top .top_left{
		display: flex;
		align-items: center;
	}
	.evalute_list .top .avatar{
		width:58rpx;
		height: 58rpx;
		border-radius: 50%;
		margin-right: 18rpx;
	}
	.evalute_list .top .name{
		font-size: 28rpx;
		color: #323232;
	}
	.evalute_list .top .company{
		font-size: 20rpx;
		color: #838282;
	}
	.evalute_list .top .time{
		font-size: 25rpx;
		color: #838282;
	}
	.evalute_list .content{
		font-size: 28rpx;
		color: #333333;
		
	}
	.evalute_list .img_list{
		display: flex;
		flex-wrap: wrap;
		margin-top: 40rpx;
	}
	.evalute_list .img_list image{
		width:200rpx;
		height: 200rpx;
		margin-right: 20rpx;	
	}
	.evalute_list .img_list image:nth-child(3n){
		margin-right: 0	
	}
</style>
